﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using KL.Store.Web.Models;
using KL.Store.Data;
using KL.Store.Core.Domain;

namespace KL.Store.Web.Controllers
{
    [Authorize]
    public class WishListsController : KL.Store.Core.Web.BaseController
    {
        #region Index

        public ActionResult Index()
        {
            return View();
        }

        #endregion

        #region Get

        [Child]
        public ActionResult Get()
        {
            WishListsModel wishListsModel = new WishListsModel();

            if (eStoreUser.AccountId > 0)
            {
                wishListsModel.WishLists = dbWishLists.GetList(eStoreUser.AccountId);
            }
            if (wishListsModel.WishLists == null)
            {
                wishListsModel.WishLists = new List<WishList>();
            }
            return PartialView("Get", wishListsModel);
        }

        #endregion

    }
}
